# coding=utf-8
import arcpy
import math
import json

path = r'D:\WorkData\20250712四川河流\0812'
arcpy.env.workspace = path
arcpy.env.overwriteOutput = True
spatial_ref = arcpy.SpatialReference(4326)
riv = r'D:\WorkData\20250712四川河流\0812\rivs.shp'.decode('utf-8')
lp = r'D:\WorkData\20250712四川河流\0812\p.shp'.decode('utf-8')
cs1 = arcpy.da.SearchCursor(lp,['SHAPE@XY'])
# [geo_p_x,geo_p_y] = [row[0] for row in cs1][0]
res = [row[0] for row in cs1]
geo_x =res[0][0]
geo_y = res[0][1]
print '%.14f'%geo_x, '%.14f'%geo_y

cs2 = arcpy.da.SearchCursor(riv, ['SHAPE@JSON', 'rivid'])
pointList = json.loads([row2[0] for row2 in cs2][0])['paths'][0]
